export function getPhoneLogin(data) {
  return new Promise((resolve, reject) => {
    uni.request({
      url: 'api/login/phone', // 后端接口地址
      method: 'POST',
      data,
      header: {
        'Content-Type': 'application/json',
      },
      success: (res) => {
        if (res.statusCode === 200) {
          resolve(res.data);
        } else {
          reject(res.data || { code: 500, msg: '请求失败' });
        }
      },
      fail: (err) => {
        reject(err);
      },
    });
  });
}